package com.jinjia.ordersys.dao;

import com.jinjia.ordersys.domain.Order;
import com.jinjia.ordersys.dto.OrderDto;
import com.jinjia.ordersys.dto.QueryOrdersDTO;
import com.jinjia.ordersys.vo.CustomerInfoVO;
import com.jinjia.ordersys.vo.QueryHistoryOrderVo;
import com.jinjia.ordersys.vo.QueryOrderVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: 订单-操作接口
 * @Param:
 * @return:
 * @Author: fenghouzhi
 * @Date: 2018/10/11
 * @Time: 3:50 PM
 */
@Repository
public interface OrderMapper {

    List<Order> getAllOrderForBase();

    List<OrderDto> getDeleleOrderDtos(QueryOrdersDTO queryOrdersDTO);

    List<OrderDto> getStopOrders(QueryOrdersDTO queryOrdersDTO);

    List<OrderDto> getAllHistoryOrdersDto(QueryHistoryOrderVo queryHistoryOrderVo);

    List<OrderDto> getAllOrderDto(QueryOrderVo queryOrderVo);

    OrderDto getOrderDetail(@Param("orderId") Long orderId);

    Long addOrder(Order order);

    Integer editOrder(Order order);

    Integer updateOrder(Order order);

    Integer deleteOrderById(@Param("orderId") Long orderId);

    List<CustomerInfoVO> getCustomersByPersonId(@Param("personId") Long personId);

}